package com.mm.shiro.service;

import com.mm.dds.datasource.DynamicDataSource;
import com.mm.dds.datasource.SetDynamicDataSource;
import com.mm.shiro.dao.User;
import com.mm.shiro.dao.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by Administrator on 2018/9/17/017.
 */
@Service
public class UserService {

    @Autowired
    UserMapper mapper;

    public User findUserByName(String name){
        SetDynamicDataSource.setDDS("default");
        return mapper.findByUserName(name);
    }
}
